package com.taofuxn.admin.common.exception;


import lombok.Getter;

public enum ExceptionEnum {

    /**
     * 通用异常
     */
    COMMON_ERROR(340, "网络异常，请稍后重试！"),
    NOT_LOGIN(3401, "请登录"),
    /**
     * 参数校验4000起步
     */
    PARAM_ERROR(4000, "参数异常"),

    /**
     * 系统业务异常5000起步
     */
    ACCOUNT_NOT_FOUND(5000, "账号不存在"),
    PASSWORD_ERROR(5001, "账号密码错误"),
    RESOURCE_NOT_FOUND_ERROR(5002, "资源不存在"),
    SYSUSER_ROLE_NOT_FOUND_ERROR(5003, "用户没有分配角色");

    @Getter
    private Integer code;
    @Getter
    private String msg;

    ExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
